/*
  @Time:   2021-05-03
  @File:   errorhandler.go
  @Author: ls
*/
package utils

import "fmt"

func ErrorHandler(fn fnType) fnType {
	return func(args ...interface{}){
		defer func() {
			err := recover()
			if err != nil{
				fmt.Println("有异常", err)
				return
			}
		}()
		fn(args...)
	}
}


